<?php

class Controller_User extends Controller_Base
{
	public function before()
	{
		parent::before();		
	}
	
	public function action_register()
	{
		$this->template->title[] = 'Rejestracja'; 
		
		$this->template->content = View::factory('user/register')
			->bind('errors', $errors);       
		
		$user = ORM::factory('user');
		
		if($_POST)
		{
		   if($user->save_user($_POST))
		   {
		       echo 'redirect';
		   }   
		   else
		   {
		       $errors = $_POST->errors();
		   }
		}	
	}
}
